package com.gooluke.mds.common.annotation;

import org.springframework.transaction.TransactionDefinition;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

/**
 * @author gooluke
 * description
 * datetime 2025-06-11 19:20
 */
@Target({ElementType.METHOD})
@Retention(RetentionPolicy.RUNTIME)
public @interface MapperMultiDataSource {

    /**
     * 数据源列表
     */
    String[] names();

    /**
     * 事务隔离级别 默认 READ_COMMITTED
     */
    int isolationLevel() default TransactionDefinition.ISOLATION_READ_COMMITTED;

    /**
     * 事务传播行为 默认  PROPAGATION_REQUIRES_NEW
     */
    int propagation() default TransactionDefinition.PROPAGATION_REQUIRES_NEW;

}
